/**
 */
package com.dingpeikeji.quickdeer.core.modules.driver.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.dingpeikeji.quickdeer.core.common.utils.excel.annotation.ExcelField;
import com.dingpeikeji.quickdeer.core.modules.sys.entity.Office;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 司机管理Entity
 * @author lh
 * @version 2016-05-25
 */
public class TDrivers extends DataEntity<TDrivers> {
	
	private static final long serialVersionUID = 1L;
	private String drvssysid;		// 司机编号
	private Office office;		// 公司编号
	private String drvname;		// 姓名
	private String gender;		// 性别
	private String drvstatus;		// 司机状态
	private String drvattr;		// 司机属性
	private String drvbirth;		// 出生年月日
	private String mobile;		// 手机号
	private String wechatid; 	// 微信号
	private String idnumber;		// 身份证号
	private String drvlicno;		// 驾驶证号
	private String worklicno;		// 上岗证号
	private String permittype;		// 驾照类型
	private String education;		// 文化程度
	private String nationality;		// 民族
	private String hometel;		// 联系电话
	private String serverclass;		// 服务等级
	private String bloodtype;		// 血型
	private String census;		// 户籍所在地
	private String address;		// 现居住地
	private Date entrytype;		// 入职时间
	private String contractperiod;		// 合同期限
	private Date collardate;		// 驾驶证初领日期
	private String assignflag;  //司机是否驾车
	private String createby;	//创建人
	private String belong; //归属 1本公司 0外公司
	
	
	public TDrivers() {
		super();
	}

	public TDrivers(String id){
		super(id);
	}
	@ExcelField(title = "编号", type = 1, align = 2, sort = 1)
	public String getDrvssysid() {
		return drvssysid;
	}

	public void setDrvssysid(String drvssysid) {
		this.drvssysid = drvssysid;
	}
	
	@NotNull(message="公司编号不能为空")
	@ExcelField(title = "车队", align = 2, sort = 2)
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}
	
	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	@Length(min=1, max=30, message="姓名长度必须介于 1 和 30 之间")
	@ExcelField(title = "姓名", align = 2, sort = 3)
	public String getDrvname() {
		return drvname;
	}

	public void setDrvname(String drvname) {
		this.drvname = drvname;
	}
	
	@Length(min=0, max=2, message="性别长度必须介于 0 和 2 之间")
	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}
	
	@Length(min=0, max=10, message="司机状态长度必须介于 0 和 10 之间")
	public String getDrvstatus() {
		return drvstatus;
	}

	public void setDrvstatus(String drvstatus) {
		this.drvstatus = drvstatus;
	}
	
	@Length(min=0, max=10, message="司机属性长度必须介于 0 和 10 之间")
	public String getDrvattr() {
		return drvattr;
	}

	public void setDrvattr(String drvattr) {
		this.drvattr = drvattr;
	}
	
	
	public String getDrvbirth() {
		return drvbirth;
	}

	public void setDrvbirth(String drvbirth) {
		this.drvbirth = drvbirth;
	}

	@Length(min=1, max=20, message="手机号长度必须介于 1 和 20 之间")
	@ExcelField(title = "手机号", align = 2, sort = 4)
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	@Length(min=0, max=18, message="身份证号长度必须介于 0 和 18 之间")
	@ExcelField(title = "身份证号", align = 2, sort = 5)
	public String getIdnumber() {
		return idnumber;
	}

	public void setIdnumber(String idnumber) {
		this.idnumber = idnumber;
	}
	
	@Length(min=0, max=20, message="驾驶证号长度必须介于 0 和 20 之间")
	@ExcelField(title = "驾驶证号", align = 2, sort = 6)
	public String getDrvlicno() {
		return drvlicno;
	}

	public void setDrvlicno(String drvlicno) {
		this.drvlicno = drvlicno;
	}
	
	@Length(min=0, max=20, message="上岗证号长度必须介于 0 和 20 之间")
	@ExcelField(title = "上岗证号", align = 2, sort = 7)
	public String getWorklicno() {
		return worklicno;
	}

	public void setWorklicno(String worklicno) {
		this.worklicno = worklicno;
	}
	
	@Length(min=0, max=2, message="准驾车型长度必须介于 0 和 2 之间")
	@ExcelField(title = "驾照类型", align = 2, sort = 8)
	public String getPermittype() {
		return permittype;
	}

	public void setPermittype(String permittype) {
		this.permittype = permittype;
	}
	
	@Length(min=0, max=10, message="文化程度长度必须介于 0 和 10 之间")
	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}
	
	@Length(min=0, max=20, message="民族长度必须介于 0 和 20 之间")
	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}
	
	@Length(min=0, max=20, message="住宅电话长度必须介于 0 和 20 之间")
	public String getHometel() {
		return hometel;
	}

	public void setHometel(String hometel) {
		this.hometel = hometel;
	}
	
	@Length(min=0, max=10, message="服务等级长度必须介于 0 和 10 之间")
	public String getServerclass() {
		return serverclass;
	}

	public void setServerclass(String serverclass) {
		this.serverclass = serverclass;
	}
	
	@Length(min=0, max=4, message="血型长度必须介于 0 和 4 之间")
	public String getBloodtype() {
		return bloodtype;
	}

	public void setBloodtype(String bloodtype) {
		this.bloodtype = bloodtype;
	}
	
	@Length(min=0, max=80, message="户口所在地长度必须介于 0 和 80 之间")
	public String getCensus() {
		return census;
	}

	public void setCensus(String census) {
		this.census = census;
	}
	
	@Length(min=0, max=80, message="住址长度必须介于 0 和 80 之间")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEntrytype() {
		return entrytype;
	}

	public void setEntrytype(Date entrytype) {
		this.entrytype = entrytype;
	}
	
	@Length(min=0, max=30, message="合同期限长度必须介于 0 和 30 之间")
	public String getContractperiod() {
		return contractperiod;
	}

	public void setContractperiod(String contractperiod) {
		this.contractperiod = contractperiod;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCollardate() {
		return collardate;
	}

	public void setCollardate(Date collardate) {
		this.collardate = collardate;
	}

	public String getAssignflag() {
		return assignflag;
	}

	public void setAssignflag(String assignflag) {
		this.assignflag = assignflag;
	}

	public String getCreateby() {
		return createby;
	}

	public void setCreateby(String createby) {
		this.createby = createby;
	}

	public String getWechatid() {
		return wechatid;
	}

	public void setWechatid(String wechatid) {
		this.wechatid = wechatid;
	}
	
}
